<template>
    <el-breadcrumb separator="/">
      <el-breadcrumb-item 
        v-for="(item, index) in breadList"
        :key="item.path"
        :to="index < breadList.length - 1 ? item.path : ''">
        {{ item.meta.title }}
      </el-breadcrumb-item>
    </el-breadcrumb>
  </template>
  
  <script>
  export default {
    computed: {
      breadList() {
        return this.$route.matched.filter(item => item.meta && item.meta.title)
      }
    }
  }
  </script>
  
  <style scoped>
  .el-breadcrumb {
    margin: 16px 0;
    padding: 0 40px;
  }
  .el-breadcrumb__item:last-child .el-breadcrumb__inner {
    color: #606266;
    font-weight: normal;
  }
  </style>